package com.github.xiaoymin.map.common.em;

import cn.hutool.core.util.StrUtil;

public enum BaiduCoordEnums {

    GPS(1,"GPS设备获取的角度坐标，WGS84坐标"),
    SOGOU(2,"GPS获取的墨卡托平面坐标、sogou地图所用坐标"),
    GSAMA(3,"google地图、soso地图、aliyun地图、mapabc地图和amap地图所用坐标，国测局（GCJ02）坐标"),
    GSAMA_MAPBAR(4,"3中列表地图坐标对应的墨卡托平面坐标"),
    BAIDU(5,"百度地图采用的经纬度坐标"),
    BAIDU_MERCTOR(6,"百度地图采用的墨卡托平面坐标"),
    MAPBAR(7,"mapbar地图坐标"),
    FIVE_ONE(8,"51地图坐标"),
    ;

    private Integer num;

    private String des;

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    BaiduCoordEnums(Integer num, String des) {
        this.num = num;
        this.des = des;
    }

    public static Integer getNum(String index) {
        for (BaiduCoordEnums p : BaiduCoordEnums.values()) {
            if (StrUtil.equalsIgnoreCase(p.name(),index)) {
                return p.num;
            }
        }
        return null;
    }
}
